<?php

namespace App\Kuafu\Coupon\Enum;

class CouponEnum
{
    const TIME_TYPE_ABSOLUTE = 1;
    const TIME_TYPE_RELATIVE = 2;

    const TIME_TYPES           = [
        self::TIME_TYPE_ABSOLUTE => '固定时间',
        self::TIME_TYPE_RELATIVE => '相对时间',
    ];
    const COUPON_TYPE_VOUCHERS = 1; // 代金券
    const COUPON_TYPE_EXCHANGE = 2; // 商品兑换券
    const COUPON_TYPE_DISCOUNT = 3; // 折扣券

    /**
     * 优惠券类型
     */
    public const COUPONTYPE = [
        self::COUPON_TYPE_VOUCHERS => "代金券",
        self::COUPON_TYPE_EXCHANGE => "商品兑换券",
        self::COUPON_TYPE_DISCOUNT => "折扣券",
    ];


    public const SUPERPOSE_ACTIVITY_CAN = 1; //可以和其他活动叠加使用
    public const SUPERPOSE_ACTIVITY_NO  = 0; //不可以和其他活动叠加使用

    public const SUPERPOSE_COUPON_CAN = 1; //可以和其他优惠券叠加使用
    public const SUPERPOSE_COUPON_NO  = 0; //不可以和其他优惠券叠加使用

    public const PRODUCT_USE_TYPE_NO  = 1; //商品类型不可以使用
    public const PRODUCT_USE_TYPE_CAN = 0; //商品类型可以使用

    public const ACTIVITY_CACHE_TIME_START = 3600;
    public const ACTIVITY_CACHE_TIME_END   = 7200;

    const STATUS_NORMAL  = 0;
    const STATUS_DISABLE = 1;
    const STATUS_OTHER   = 2;

    /**
     * 活动状态
     */
    public const COUPONSTATUS = [
        self::STATUS_NORMAL  => "正常",
        self::STATUS_DISABLE => "停用",
        self::STATUS_OTHER   => "其他",
    ];

    const SOURCE_ALL = 0;

    /**
     * 公共渠道
     */
    public const PUBLICCHANNELS = [
        self::SOURCE_ALL => "全部渠道",
    ];


    const SOURCE_POS    = 1;
    const SOURCE_APPLET = 2;

    /**
     * 可使用渠道
     */
    public const AVAILABLESOURCE = [
        self::SOURCE_POS    => "POS",
        self::SOURCE_APPLET => "小程序",
    ];

    const FIXED_TIME    = 1;
    const RELATIVE_TIME = 2;

    /**
     * 使用有效期
     */
    public const COUPONUSETIME = [
        self::FIXED_TIME    => "固定时间",
        self::RELATIVE_TIME => "有效时间"
    ];

    const FIXED_AMOUNT        = 1;
    const NO_DISCOUNT         = 2;
    const DISCOUNT_PERCENTAGE = 3;

    /**
     * 优惠力度
     */
    public const ODDERSTRENGTH = [
        self::FIXED_AMOUNT        => "固定金额",
        self::NO_DISCOUNT         => "无优惠",
        self::DISCOUNT_PERCENTAGE => "折扣比例",
    ];

    const UNABLE_DATE_MONDAY    = 1;
    const UNABLE_DATE_TUESDAY   = 2;
    const UNABLE_DATE_WEDNESDAY = 3;
    const UNABLE_DATE_THURSDAY  = 4;
    const UNABLE_DATE_FRIDAY    = 5;
    const UNABLE_DATE_SATURDAY  = 6;
    const UNABLE_DATE_SUNDAY    = 7;
    const UNABLE_DATE_HOLIDAY   = 8;

    public const UNABLE_DATA = [
        self::UNABLE_DATE_MONDAY    => '星期一',
        self::UNABLE_DATE_TUESDAY   => '星期二',
        self::UNABLE_DATE_WEDNESDAY => '星期三',
        self::UNABLE_DATE_THURSDAY  => '星期四',
        self::UNABLE_DATE_FRIDAY    => '星期五',
        self::UNABLE_DATE_SATURDAY  => '星期六',
        self::UNABLE_DATE_SUNDAY    => '星期日',
        self::UNABLE_DATE_HOLIDAY   => '法定节假日',
    ];


}
